package sanrenxing.dayEnd.backRepertoryTotal.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import sanrenxing.dayEnd.backRepertoryTotal.domain.Share;

import java.util.List;

public interface ShareDao {

    @Select("select fst.seId,fst.seName,sts.secNum,eds.rigType as regType,eds.righDay,(sts.secNum/10)*eds.pro as pro from \n" +
            "equityData eds join financialsecurities fst on eds.seId=fst.seId join securitiesStock sts on sts.seId=eds.seId where eds.proState=1")
    public List<Share> selectByPage(@Param("start") int start, @Param("end") int end);

    @Select("select count(*) from equityData eds join financialsecurities fst on eds.seId=fst.seId join securitiesStock sts on sts.seId=eds.seId where eds.proState=1")
    public int count();

}
